From: Florian Müllner Date: Sat, 27 Feb 2010 22:19:24 +0000 (+0100) Subject: [StEntry] Make the cursor size stylable X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~10355 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a0b5a44fe9542735864ac3d29d937eb24e7a6319;p=gnome-shell.git [StEntry] Make the cursor size stylable Just as the cursor color can be styled using the "caret-color" property, expose the cursor size as "caret-size". https://bugzilla.gnome.org/show_bug.cgi?id=611095 --- diff --git a/src/st/st-entry.c b/src/st/st-entry.c index e4749028e..1c3e3ae12 100644 --- a/src/st/st-entry.c +++ b/src/st/st-entry.c @@ -184,12 +184,16 @@ st_entry_style_changed (StWidget *self) ClutterColor color; const PangoFontDescription *font; gchar *font_string; + gdouble size; theme_node = st_widget_get_theme_node (self); st_theme_node_get_foreground_color (theme_node, &color); clutter_text_set_color (CLUTTER_TEXT (priv->entry), &color); + if (st_theme_node_get_length (theme_node, "caret-size", FALSE, &size)) + clutter_text_set_cursor_size (CLUTTER_TEXT (priv->entry), (int)(.5 + size)); + if (st_theme_node_get_color (theme_node, "caret-color", FALSE, &color)) clutter_text_set_cursor_color (CLUTTER_TEXT (priv->entry), &color);